<include file="Public:header" /><!-- header -->

<div class="wrap nosubsub">
  <div id="icon-{$ur_here.action}" class="icon32"><br /></div><h2>{$ur_here.text}</h2>
  <form class="search-form" action="{:U('Admin/Metas/tag')}" method="post">
    <p class="search-box">
      <label class="screen-reader-text" for="tag-search-input">搜索标签:</label>
      <input type="text" id="tag-search-input" name="s" value="" />
      <input type="submit" name="" id="search-submit" class="button" value="搜索标签"  />
    </p>
  </form>
  <br class="clear" />
  <div id="col-container">
    <div id="col-right">
      <div class="col-wrap">
        <form id="posts-filter" action="{:U('Admin/Metas/batch')}" method="post">
		<input type="hidden" name="type" value="tag">
          <div class="tablenav top">
            <div class="alignleft actions">
              <select name='action'>
                <option value='-1' selected='selected'>批量操作</option>
                <option value='delete'>删除</option>
				<option value='refresh'>刷新</option>
              </select>
              <input type="submit" name="" id="doaction" class="button-secondary action" value="应用"  />
            </div>
            <div class='tablenav-pages'>{$page}</div>
            <br class="clear" />
          </div>
          <table class="wp-list-table widefat fixed tags" cellspacing="0">
            <thead>
              <tr>
                <th scope='col' id='cb' class='manage-column column-cb check-column'  style=""><input type="checkbox" /></th>
                <th scope='col' id='name' class='manage-column column-name {$order|default="sortable desc"}'  style=""><if condition="$sort eq asc_name"><a href="{:U('Admin/Metas/tag',array('order'=>'name','sort'=>'desc'))}"><span>名称</span><span class="sorting-indicator"></span></a>
                    <else/>
                    <a href="{:U('Admin/Metas/tag',array('order'=>'name','sort'=>'asc'))}"><span>名称</span><span class="sorting-indicator"></span></a></if></th>
                <th scope='col' id='description' class='manage-column column-description {$order|default="sortable desc"}'  style=""> <if condition="$sort eq asc_description"><a href="{:U('Admin/Metas/tag',array('order'=>'description','sort'=>'desc'))}"><span>描述</span><span class="sorting-indicator"></span></a>
                    <else/>
                    <a href="{:U('Admin/Metas/tag',array('order'=>'description','sort'=>'asc'))}"><span>描述</span><span class="sorting-indicator"></span></a></if></th>
                <th scope='col' id='slug' class='manage-column column-slug {$order|default="sortable desc"}'  style=""><if condition="$sort eq asc_slug"><a href="{:U('Admin/Metas/tag',array('order'=>'slug','sort'=>'desc'))}"><span>别名</span><span class="sorting-indicator"></span></a>
                    <else/>
                    <a href="{:U('Admin/Metas/tag',array('order'=>'slug','sort'=>'asc'))}"><span>别名</span><span class="sorting-indicator"></span></a></if></th>
                <th scope='col' id='posts' class='manage-column column-posts num {$order|default="sortable desc"}'  style=""><if condition="$sort eq asc_count"><a href="{:U('Admin/Metas/tag',array('order'=>'count','sort'=>'desc'))}"><span>文章</span><span class="sorting-indicator"></span></a>
                    <else/>
                    <a href="{:U('Admin/Metas/tag',array('order'=>'count','sort'=>'asc'))}"><span>文章</span><span class="sorting-indicator"></span></a></if></th>
              </tr>
            </thead>
            <tbody id="the-list" class='list:tag'>
			  <empty name="list"><tr class="no-items"><td class="colspanchange" colspan="5">找不到项目。</td></tr></empty>
              <volist name="list" id="vo">
                <tr id="tag-{$vo.metaid}" class="alternate">
                  <th scope="row" class="check-column"><input type="checkbox" name="metaid[]" value="{$vo.metaid}" /></th>
                  <td class='name column-name'><strong><a class="row-title" href="{:U('Admin/Metas/edit',array('type'=>'tag','metaid'=>$vo['metaid']))}" title="编辑“{$vo.name}”">{$vo.name}</a></strong><br />
                    <div class="row-actions"><span class='edit'><a href="{:U('Admin/Metas/edit',array('type'=>'tag','metaid'=>$vo['metaid']))}">编辑</a> | </span><span class='inline hide-if-no-js'><a href="#" class="editinline">快速编辑</a> | </span><span class='delete'><a class='delete-tag' href="{:U('Admin-Metas/delete',array('type'=>'tag','metaid'=>$vo['metaid']))}" onclick="return confirm('您将永久删除所选项目。');">删除</a> | </span><span class='view'><a href="{:U('/tag/' . $vo['slug'] )}" target="_blank">查看</a></span></div>
                    <div class="hidden" id="inline_{$vo.metaid}">
                      <div class="name">{$vo.name}</div>
                      <div class="slug">{$vo.slug|urldecode}</div>
                      <div class="parent">{$vo.parent}</div>
                    </div></td>
                  <td class='description column-description'>{$vo.description}</td>
                  <td class='slug column-slug'>{$vo.slug|urldecode}</td>
                  <td class='posts column-posts'><a href="{:U('Admin/Posts/index',array('type'=>'tag','metaid'=>$vo['metaid']))}">{$vo.count}</a></td>
                </tr>
              </volist>
            </tbody>
          </table>
          <br class="clear" />
        </form>
      </div>
    </div>
    <!-- /col-right -->
    <div id="col-left">
      <div class="col-wrap">
        <div class="form-wrap">
          <h3>添加新标签</h3>
          <form id="addtag" method="post" action="{:U('Admin-Metas/tag')}" class="validate">
            <input type="hidden" name="type" value="tag">
            <input type="hidden" name="action" value="tag">
            <div class="form-field form-required">
              <label for="tag-name">名称</label>
              <input name="name" id="tag-name" type="text" value="" size="40" aria-required="true" />
              <p>这将是它在站点上显示的名字。</p>
            </div>
            <div class="form-field">
              <label for="tag-slug">别名</label>
              <input name="slug" id="tag-slug" type="text" value="" size="40" />
              <p>“别名”是对于 URL 友好的一个别称。它通常为小写并且只能包含字母，数字和连字符（-）。</p>
            </div>
            <div class="form-field">
              <label for="tag-description">描述</label>
              <textarea name="description" id="tag-description" rows="5" cols="40"></textarea>
              <p>描述只会在一部分主题中显示。</p>
            </div>
            <p class="submit">
              <input type="submit" name="submit" id="submit" class="button" value="添加新标签"  />
            </p>
          </form>
        </div>
      </div>
    </div>
    <!-- /col-left -->
  </div>
  <!-- /col-container -->
</div>
<!-- /wrap -->
<form method="get" action="">
  <table style="display: none">
    <tbody id="inlineedit">
      <tr id="inline-edit" class="inline-edit-row" style="display: none">
        <td colspan="5" class="colspanchange"><fieldset>
          <div class="inline-edit-col">
            <h4>快速编辑</h4>
            <label> <span class="title">名称</span> <span class="input-text-wrap">
            <input type="text" name="name" class="ptitle" value="" />
            </span> </label>
            <label> <span class="title">别名</span> <span class="input-text-wrap">
            <input type="text" name="slug" class="ptitle" value="" />
            </span> </label>
          </div>
          </fieldset>
          <p class="inline-edit-save submit"> <a accesskey="c" href="#inline-edit" title="取消" class="cancel button-secondary alignleft">取消</a> <a accesskey="s" href="#inline-edit" title="更新标签" class="save button-primary alignright">更新标签</a> <img class="waiting" style="display:none;" src="__PUBLIC__/admin/images/wpspin_light.gif" alt="" /> <span class="error" style="display:none;"></span>
            <input type="hidden" name="taxonomy" value="tag" />
			<input type="hidden" name="type" value="tag" />
            <br class="clear" />
          </p></td>
      </tr>
    </tbody>
  </table>
</form>
<script type='text/javascript' src='__PUBLIC__/js/wp-ajax-response.js?{$Think.const.VERHASH}'></script>
<script type="text/javascript">
var _ajaxUrl_ = '{:U('Admin/Metas/ajaxEdit')}';
</script>
<script type='text/javascript' src='__PUBLIC__/admin/js/inline-edit-tax.js?{$Think.const.VERHASH}'></script>
<include file="Public:footer" />
